<?php
namespace Src;

class Smarty
{

    public $smarty;

    public function __construct()
    {
        $this->smarty = new \Smarty;//生成smarty类
        //$this->smarty->left_delimiter = "{#";
        //$this->smarty->right_delimiter = "#}";
        $this->smarty->setTemplateDir(SMARTY.'template'.DIRECTORY_SEPARATOR); //设置模板目录
        $this->smarty->setCompileDir(SMARTY.'template_c'.DIRECTORY_SEPARATOR);//  设置编译目录
        $this->smarty->setConfigDir(SMARTY.'config'.DIRECTORY_SEPARATOR);
        $this->smarty->setCacheDir(SMARTY.'cache'.DIRECTORY_SEPARATOR);//设置缓存目录
        //$this->smarty->force_compile = true; 强制编译的意思？
        // if (APP_DEBUG) {
        // //$this->smarty->debugging      = true;//smarty的排除模式开启？
        // $this->smarty->caching        = false;
        // $this->smarty->cache_lifetime = 0;
        // } else {
        // //$this->smarty->debugging      = false;
        // $this->smarty->caching        = true;
        // $this->smarty->cache_lifetime = 120;
        // }
        $this->smarty->caching = false;
        $this->smarty->cache_lifetime = 0;
    }


    private function __clone() {}

    public function __destruct(){}
}